<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .father{
            width: 400px;
            height: 400px;
            background-color: gold;
            margin-top: 50px;

            /* border: 1px solid red; */

            /* 专业叫使用 overflow:hidden 触发一个BFC */
            /* overflow: hidden; */

            /* padding-top: 1px; */

            /* 给父元素或子元素设置浮动，触发一个BFC */
            float: left;

        }
        .son{
            width: 200px;
            height: 200px;
            background-color: skyblue;
            margin-top: 51px;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son"></div>
    </div>
</body>

</html>